//
//  Info.m
//  LoveOfPet
//
//  Created by 芦彬 on 15/11/15.
//  Copyright © 2015年 孔维. All rights reserved.
//

#import "Info.h"

@implementation Info

- (void)dealloc{
    [_avatar release];
    [_birth release];
    [_citys release];
    [_groups release];
    [_nickname release];
    [_tags release];
    [super dealloc];
}

- (instancetype)initWithDictionary:(NSDictionary *)dic{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (Info *)infoWithDictionary:(NSDictionary *)dictionary{
    Info *info = [[Info alloc]initWithDictionary:dictionary];
    return [info autorelease];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}
- (void)setValue:(id)value forKey:(NSString *)key{
    if ([key isEqualToString:@"tags"]) {
        if ([value count]) {
            self.tags = [value objectAtIndex:0];
        }
    }else{
        [super setValue:value forKey:key];
    }
}

@end
